home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PRINTER
/
PROHP.ARJ
/
DCALENDA.PRG
< prev
next >
Wrap
Text File
|
1992-06-23
|
2KB
|
58 lines
/*
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ Program : calendar.PRG │
│ │
│ Purpose : demonstrate the use of HPdrawmonth. │
│ │
│ Author : Copyright (C) 1992, I.L.A.,Inc. All Rights reserved. │
│ │
│ Comments: This source code may be distributed and used freely │
│ provided that the copyright notice is not removed. │
│ │
└─────────────────────────────────────────────────────────────────────────┘
*/
#include "prohp.ch"
proc main()
Local nPageH:=7.5 , nPageW:=10 , nCalSp := 0.3
Local nTop := 0, nLeft := 0.2, nCalH := nPageH/2 -nCalSp
Local nDayW,nDayH
Local nCalW:=nPageW, date:=date(), aCal
HP_init()
HP_send(.T.)
set2print("dcalend.hpc")
HP_orient(LANDSCAPE)
HPshadow(.t.)
HP_data(D_SHADOWWIDTH,HPsetshadow()[1]*1.5) // Look in the manual for answer.
HP_data(D_SHADOWGRAYPAT,30)
HP_setpos(nTop,nLeft)
HP_bar(nCalH,nCalW,GFILLGRAY,2)
HPdrawmonth(date,nTop,nLeft,nCalH,nCalW)
nTop+=nCalH+nCalSp
nCalW:=(nPageW-nCalSp) / 2
date:=zaddmonth(date,-1)
HP_data(D_SHADOWGRAYPAT,20)
HP_data(D_LINEFILL,GFILLGRAY)
HP_data(D_LINEGRAYPAT,40)
nDayW := nCalW / 7
nDayH := nCalH / 6
HP_setpos( nTop+nDayH, nLeft + nDayW * 6)
HP_bar(nCalH-nDayH,nDayW,GFILLGRAY,10)
HPdrawmonth(date,nTop,nLeft,nCalH,nCalW)
nLeft+=nCalW+nCalSp
date:=zaddmonth(date,1)
HP_setpos( nTop+nDayH, nLeft + nDayW * 6)
HP_bar(nCalH-nDayH,nDayW,GFILLGRAY,10)
aCal := HPdrawmonth(date,nTop,nLeft,nCalH,nCalW)
HP_reset() // reset printer to defautls.
set2screen()
return